#ifndef _RETRO_SPRITELIST
#define _RETRO_SPRITELIST

namespace Retro
{
  namespace Creator
  {
    namespace Toolbox
    {
      class SpriteList : public GUI::ListBase
      {
      private:
        Data::SpriteData*   currSprite;
        Editor::SelectMode  selectMode;
        Editor::SpriteEditor* mEditor;

        Gdip::Font  mFont;

        INT spriteIndex;
        INT overedIndex;
        INT lastIndex;
        INT dragIndex;

        VOID  seekSprite(INT index);

      protected:
        VOID  paintItem(
          Gdip::Graphics&     g,
          const Gdip::Rect&   bounds,
          INT                 index
          );
        VOID  paintForeground(
          Gdip::Graphics&     g,
          const Gdip::Rect&   bounds
          );

        VOID  onMouseDown(Event::MouseEvent& iEvent);
        VOID  onMouseMove(Event::MouseEvent& iEvent);
        VOID  onMouseUp(Event::MouseEvent& iEvent);
        VOID  onMouseLeave();
        VOID  onKeyDown(Event::KeyEvent& iEvent);

      public:
        VOID  updateList();

        INL Editor::SpriteEditor* getEditor()
        {
          return mEditor;
        }

        INL VOID setEditor(Editor::SpriteEditor* iValue)
        {
          mEditor = iValue;
        }

        SpriteList();
      };
    } // namespace Toolbox
  } // namespace Creator
} // namespace Retro

#endif
